firstpass 4x4x1 split#118
Conversation
| """ | ||
| # image_sizes, min_size = self.collect_image_sizes() | ||
| min_step_size = self.find_min_step_size() | ||
| # min_step_size = self.find_min_step_size() |
There was a problem hiding this comment.
Had to bypass this function and use min_step_size = [1, 1, 1]. See issue #117
| from_val = input_min[i] | ||
|
|
||
| while to_val < input[i]: | ||
| while to_val < input[i]-1: |
There was a problem hiding this comment.
Added '-1' to the while loop condition here, because invervals are 0-indexed, while input (size of the dataset coming from the xml directly) is 1-indexed. This was causing it to create an extra last inerval after all of the proper ones (eg to_val was 479, the last pixel in 0-indexd , input[i] was 480)
| size = l + size | ||
| return size | ||
|
|
||
| def last_image_size(self, L, S, O): |
There was a problem hiding this comment.
Vibe-coded a replacement to last_image_size. My understanding is that this function should return the size of the last split-tile in the dimenstion. I was using parameters:
L=480 # total dimension length
S=192 # target split-tile size in this dimension
O=96 # size of overlap.
These parameters should perfectly tile with 4 tiles (1924) - (963) = 480. The function was returning 96. New function returns 192.
This now aligns with the use of the function's return value on line 144 "if last_image_size != s:" aka (if the tiling is not perfect).
| if length <= self.target_image_size[i]: | ||
| pass | ||
| dim_intervals.append((0, length - 1)) |
There was a problem hiding this comment.
If the dimension is smaller than the target tiling size, add at least one interval that represents the entire dimension.
Without this, the cursor object below does not create any split-tiles.
| channel = file_path.split("_ch_", 1)[1].split(".ome.zarr", 1)[0] | ||
|
|
||
| # channel = file_path.split("_ch_", 1)[1].split(".ome.zarr", 1)[0] | ||
| channel = 0 # Placeholder for channel extraction logic |
There was a problem hiding this comment.
Had to bypass this channel logic that is based on file name. This should be removed so that there is no hard-coded enforcement of any filenames
PUT YOUR LINK TO THE JIRA TICKET HERE
Description of the changes you made
Type of change
How Has This Been Tested?
Checklist of Requirements
Instructions for Testing
List dependencies, related tickets, or tasks
Additional screenshots or context